Conversation
|
Hi @lukey78 ! Thanks for contributing to the project! I have a few questions about this PR.
Can you please elaborate in more detail what the practical purpose of this PR is? I might be missing something that you have discovered about this behavior. |
|
Hi, actually we use clamav-rest behind a nginx server forwarding requests to the service. I agress that this might be not needed inside a cluster where dedicated liveness probes are used. This endpoint should also not be used to kill the container, just for monitoring. Ensuring that updates are configured to be done twice a day does not mean the updates are always done. What if communicating with the update server fails? We might have several days without properly updated signatures and the health check should monitor this. I agree with the default setting to match the SIGNATURE_CHECKS. But: A signature check does not mean that new sigantures are available. AFAIK ClamAV does not release new signatures to dedicated timestamps, or do they? For the status code: I preferred a dedicated error because 5xx usually means something unexpected went wrong on the server side. Signatures that are not up-to-date are not a real error, but just a warning. Also, I want to differentiate between not up2date signatures and a non-running service. See you, |
|
That sounds reasonable. I will discuss with my co-maintainer and get back you! |
Add a monitoring endpoint to check if virus signatures are up2date.
The env var HEALTHCHECK_MAX_SIGNATURE_AGE defines the behaviour. If virus signatures are older than the defined hours, the /healthcheck endpoint returns HTTP status code 420 - otherwise it returns 200 OK.